bitkeeper revision 1.1628.1.1 (429dd92aYeqV9tl4b0g_F_deORFVAQ)
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 1 Jun 2005 15:50:02 +0000 (15:50 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 1 Jun 2005 15:50:02 +0000 (15:50 +0000)
Fix sync_lazy_execstate functions to correctly sync the local cpu.
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/domain.c

index 4d49724c4eb02f8240a5cfb97f5e8d4ac7072f72..25f0125609559ceaa9c027c9123ce671d512f865 100644 (file)
@@ -819,12 +819,17 @@ int __sync_lazy_execstate(void)
 
 void sync_lazy_execstate_cpuset(unsigned long cpuset)
 {
-    flush_tlb_mask(cpuset);
+    if ( cpuset & (1 << smp_processor_id()) )
+        (void)__sync_lazy_execstate();
+    /* Other cpus call __sync_lazy_execstate from flush ipi handler. */
+    flush_tlb_mask(cpuset & ~(1 << smp_processor_id()));
 }
 
 void sync_lazy_execstate_all(void)
 {
-    flush_tlb_all();
+    __sync_lazy_execstate();
+    /* Other cpus call __sync_lazy_execstate from flush ipi handler. */
+    flush_tlb_mask(((1<<num_online_cpus())-1) & ~(1 << smp_processor_id()));
 }
 
 unsigned long __hypercall_create_continuation(